<?php /* Smarty version Smarty-3.1.18, created on 2015-08-28 12:04:38
         compiled from "/data/www/mystery/protected/views/schedule/add.tpl" */ ?>
<?php /*%%SmartyHeaderCode:106112564955dfddd6d02ea7-37865179%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '08ef9e9e1611a11609b5e4ba5ebaeaa4070c2c24' => 
    array (
      0 => '/data/www/mystery/protected/views/schedule/add.tpl',
      1 => 1423621133,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '106112564955dfddd6d02ea7-37865179',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'info' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_55dfddd6e077e7_56902546',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_55dfddd6e077e7_56902546')) {function content_55dfddd6e077e7_56902546($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<link href="/css/uploadify.css" rel="stylesheet">
<script src="/js/datepicker/WdatePicker.js"></script>
<div class="main w1060">
    <div class="pbbg"><a href="/schedule/add">新增员工</a></div>
    <form name="myform" action="<?php if ($_smarty_tpl->tpl_vars['info']->value) {?>/schedule/doedit<?php } else { ?>/schedule/doadd<?php }?>" method="post" id="myform">
        <div class="biaoge">   
    <table width="100%" class="table_form contentWrap">
    <tbody>
    <tr>
        <td width="80">员工编号</td> 
        <td>
            <input type="text" name="staff_identifier" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['staff_identifier'];?>
" class="input-text" id="staff_identifier">
        </td>
    </tr>
    <tr>
    <td width="80">头像</td> 
    <td><label>
      <input type="file" name="uploadify" id="uploadify" />
    </label>
        <input type="hidden" name="photo" id="cover" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['photo'];?>
">
        <div id="cases_img"><?php if ($_smarty_tpl->tpl_vars['info']->value['photo']) {?><img src="<?php echo $_smarty_tpl->tpl_vars['info']->value['photo'];?>
" class="img-responsive"><?php }?></div>
    </td>
    </tr>
    <tr>
        <td width="80">员工姓名</td> 
        <td><input type="text" name="staff_name" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['staff_name'];?>
" class="input-text" id="staff_name"></td>
    </tr>

    <tr>
        <td width="80">岗位</td> 
        <td><input type="text" name="station" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['station'];?>
" class="input-text" id="station"></td>
    </tr>
    <tr>
        <td width="80">是否临柜</td> 
        <td>
            <input type="checkbox" name="temporary" <?php if ($_smarty_tpl->tpl_vars['info']->value['temporary']) {?>checked="checked"<?php }?> value="1" >是
        </td>
    </tr>
    <tr>
        <td width="80">是否调岗</td> 
        <td>
            <input type="checkbox" name="shift" <?php if ($_smarty_tpl->tpl_vars['info']->value['shift']) {?>checked="checked"<?php }?>  value="1">是
        </td>
    </tr>
    <tr>
        <td width="80">调岗时间</td> 
        <td>
            <input type="text" name="shift_time" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['shift_time'];?>
" onClick="WdatePicker()" class="input-text" id="shift_time">
        </td>
    </tr>
    <tr>
        <td width="80">调后岗位</td> 
        <td>
            <input type="text" name="new_station" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['new_station'];?>
" class="input-text" id="new_station">
        </td>
    </tr>
    <tr>
        <td width="80">备注</td> 
        <td>
            <textarea name="remark" rows="5" cols="80"></textarea>
        </td>
    </tr>
    </tbody>
    </table>
        </div>
    <div class="bk15"></div>
    <?php if ($_smarty_tpl->tpl_vars['info']->value) {?><input type="hidden" name="staff_id" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['staff_id'];?>
"/><?php }?>
    <input name="dosubmit" type="submit" value="提交" class="button">
    </form>
</div>
<script src="/js/jquery.uploadify.min.js"></script>
<script type="text/javascript">

$(function(){
        $('#uploadify').uploadify({
        //'debug': true,
        'buttonText' : '选择文件',
        'fileObjName' : 'upfile',   
        'swf'      : '/js/uploadify.swf',
        'fileTypeExts' : '*.gif; *.jpg; *.png',
        'uploader' : '/webadmin/attach/do?attach_type=other',
        'onUploadSuccess' : function(file, data, response) {
            var obj = eval('(' + data + ')');
            if (obj.state =='SUCCESS'){
                $('#cover').val(obj.url);
                $('#cases_img').html('<img src="'+obj.url+'" class="img-responsive">');
                alert('上传成功');
            } else {
                alert('上传失败');
            }
        } 
    });
})
</script>
<?php echo $_smarty_tpl->getSubTemplate ("../common/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
